Programs, including multi-threaded programs, may be subjected to analysis to determine operational characteristics and inefficiencies. The analysis may include profiling that tracks the critical path for the program.
In a multithreaded program, program threads commonly need to exchange data with one another or synchronize with one another so that the threads can, for example, read or write a shared data without corrupting it. There are numerous ways this can be done, including passing messages to one another.
However, the exchange of data through passing of messages between threads may change the critical path of the program. In one example, in the passing of a synchronous message from a first thread to a second thread, the first thread is required to wait until the second thread has completed processing or has returned an explicit reply, and then proceed with further processing. The message between threads may act as a signal that changes the critical path, and thus is a factor to be tracked in the profiling of the application.